﻿@bootstrap: "../../../bootstrap-3.3.1/less/";

@import "../variables.less";
@import "../mixins.less";

// Utility classes
@import (reference) "@{bootstrap}utilities.less";

// Core CSS

@import (reference) "@{bootstrap}forms.less";
@import (reference) "@{bootstrap}navbar.less";
//
// Navbars
// --------------------------------------------------


// Wrapper and base class
//
// Provide a static navbar from which we expand to create full-width, fixed, and
// other navbar variations.

.navbar {
    .navbar;
}


// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.

.navbar-header {
    &:extend(.clearfix all);
    float: left;
}


.navbar-fixed-top,
.navbar-fixed-bottom {
    .navbar-collapse {
        max-height: @navbar-collapse-max-height;
        //@media (max-device-width: @screen-xs-min) and (orientation: landscape) {
        //  max-height: 200px;
        //}
    }
}


// Both navbar header and collapse
//
// When a container is present, change the behavior of the header and collapse.

.container,
.container-fluid {
    > .navbar-header,
    > .navbar-collapse {
        margin-right: -@navbar-padding-horizontal;
        margin-left: -@navbar-padding-horizontal;
        //@media (min-width: @grid-float-breakpoint) {
        margin-right: 0;
        margin-left: 0;
        //}
    }
}


//
// Navbar alignment options
//
// Display the navbar across the entirety of the page or fixed it to the top or
// bottom of the page.

// Static top (unfixed, but 100% wide) navbar
.navbar-static-top {
    z-index: @zindex-navbar;
    border-width: 0 0 1px;
    //@media (min-width: @grid-float-breakpoint) {
    border-radius: 0;
    //}
}

// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
    position: fixed;
    right: 0;
    left: 0;
    z-index: @zindex-navbar-fixed;
    // Undo the rounded corners
    //@media (min-width: @grid-float-breakpoint) {
    border-radius: 0;
    //}
}

.navbar-fixed-top {
    top: 0;
    border-width: 0 0 1px;
}

.navbar-fixed-bottom {
    bottom: 0;
    margin-bottom: 0; // override .navbar defaults
    border-width: 1px 0 0;
}


// Brand/project name




// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.




// Navbar nav links
//
// Builds on top of the `.nav` components with its own modifier class to make
// the nav the full height of the horizontal nav (above 768px).

.navbar-nav {
    margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;

    > li > a {
        padding-top: 10px;
        padding-bottom: 10px;
        line-height: @line-height-computed;
    }
     
    // Uncollapse the nav
    // @media (min-width: 1px) {
    float: left;
    margin: 0;

    > li {
        float: left;

        > a {
            padding-top: @navbar-padding-vertical;
            padding-bottom: @navbar-padding-vertical;
        }
    }
    // }
}


// Navbar form
//
// Extension of the `.form-inline` with some extra flavor for optimum display in
// our navbars.




// Dropdown menus

// Menu position and menu carets
.navbar-nav > li > .dropdown-menu {
    margin-top: 0;
    .border-top-radius(0);
}
// Menu position and menu caret support for dropups via extra dropup class
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
    .border-top-radius(@navbar-border-radius);
    .border-bottom-radius(0);
}


// Buttons in navbars
//
// Vertically center a button within a navbar (when *not* in a form).



// Text in navbars
//
// Add a class to make any element properly align itself vertically within the navbars.



// Component alignment
//
// Repurpose the pull utilities as their own navbar utilities to avoid specificity
// issues with parents and chaining. Only do this when the navbar is uncollapsed
// though so that navbar contents properly stack and align in mobile.
//
// Declared after the navbar components to ensure more specificity on the margins.

//@media (min-width: @grid-float-breakpoint) {
.navbar-left {
    .pull-left();
}

.navbar-right {
    .pull-right();
    //margin-right: -@navbar-padding-horizontal;
    ~ .navbar-right {
        margin-right: 0;
    }
}
//}


// Alternate navbars
// --------------------------------------------------


// Inverse navbar

.navbar-inverse { 
    background: url(../../images/nav-bg.png) left top @navbar-inverse-bg;
    .navbar-brand {
        color: @navbar-inverse-brand-color;

        &:hover,
        &:focus {
            color: @navbar-inverse-brand-hover-color;
            background-color: @navbar-inverse-brand-hover-bg;
        }
    }

    .navbar-text {
        color: @navbar-inverse-color;
    }

    .navbar-nav {
        > li > a {
            color: @navbar-inverse-link-color;

            &:hover,
            &:focus,
            &.hover {
                color: @navbar-inverse-link-hover-color;
                background:url(../../images/texture_1.png) repeat center @navbar-inverse-link-hover-bg;
            }
        }

        > .active > a {
            &,
            &:hover,
            &:focus {
                color: @navbar-inverse-link-active-color;
                background-color: @navbar-inverse-link-active-bg;
            }
        }

        > .disabled > a {
            &,
            &:hover,
            &:focus {
                color: @navbar-inverse-link-disabled-color;
                background-color: @navbar-inverse-link-disabled-bg;
            }
        }
    }
    // Darken the responsive nav toggle
    .navbar-toggle {
        border-color: @navbar-inverse-toggle-border-color;

        &:hover,
        &:focus {
            background-color: @navbar-inverse-toggle-hover-bg;
        }

        .icon-bar {
            background-color: @navbar-inverse-toggle-icon-bar-bg;
        }
    }

    .navbar-collapse,
    .navbar-form {
        border-color: darken(@navbar-inverse-bg, 7%);
    }
    // Dropdowns
    .navbar-nav {
        > .open > a {
            &,
            &:hover,
            &:focus {
                background:url(../../images/texture_1.png) repeat center @navbar-inverse-link-active-bg;
                color: @navbar-inverse-link-active-color;
            }
        }  
    }

    .navbar-link {
        color: @navbar-inverse-link-color;

        &:hover {
            color: @navbar-inverse-link-hover-color;
        }
    }

    .btn-link {
        color: @navbar-inverse-link-color;

        &:hover,
        &:focus {
            color: @navbar-inverse-link-hover-color;
        }

        &[disabled],
        fieldset[disabled] & {
            &:hover,
            &:focus {
                color: @navbar-inverse-link-disabled-color;
            }
        }
    }
}
